Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

173
Visualizações
Find element contains specific "path" attribute

Can someone please assist with the following issue?

I have map with more than 2000 elements loaded, but only one of them (which is currently visible) has the element 'path' with an attribute d different than zero. For easier understanding, refer to the following screenshot:

enter image description here

Tried with this: SVG & Path finding, but did not find what I was looking for.

And having this XPath:

//div[@id="map"]//div[contains(@class,"map")]//div[@class="leaflet-pane"]//div[@class="leaflet-pane2"]//*[name()='svg']//*[name()='path' and @d="M0 0"]

which finds all of them (2000).

What I am looking for is something like this (though I could not find the correct solution) - deliberately just added end of Xpath.

In summary, I need the d attribute (inside path) to not contain the value zero:

//*[name()='svg']//*[name()='path' and @d(contains,"125")]

Please assist, and thank you in advance.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

According to your descriptions you are looking for locator where d attribute value is not equals to M0 0.
This can be translated to XPath with not operator.
Please try this:

//div[@id="map"]//div[contains(@class,"map")]//div[@class="leaflet-pane"]//div[@class="leaflet-pane2"]//*[name()='svg']//*[name()='path' and(not(@d="M0 0"))]
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda